package com.agilegroup.crm.requests;

import static com.agilegroup.crm.utils.CONSTANTS.singleleadUrl;

import com.agilegroup.crm.model.Lead;
import com.octo.android.robospice.request.springandroid.SpringAndroidSpiceRequest;

public class ViewLeadJsonRequest extends SpringAndroidSpiceRequest<Lead>{

	private String id;
	
	public ViewLeadJsonRequest(String id) {
		super(Lead.class);
		this.id=id;
	}
	
	@Override
	public Lead loadDataFromNetwork() throws Exception {
		return getRestTemplate().getForObject(singleleadUrl+id+".json", Lead.class);
	}
}
